package com.fdq.dianping.config;


import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedisConfig {
    @Bean
    public RedissonClient redissonClient () {
        Config config = new Config();
        //添加redis单节点地址
        config.useSingleServer().setAddress("redis://121.43.68.140:6379").setPassword("873973409");
        return Redisson.create(config);
    }
}
